#include "RenderUtils.h"
#include "LibGL/OpenGL.h"

namespace FinalRendering
{
	namespace Engine
	{
		void SetupView(int w, int h, float worldW, float worldH)
		{
			glPushAttrib(GL_VIEWPORT_BIT);
			glViewport(0,0,w,h);
			glMatrixMode(GL_PROJECTION);
				glPushMatrix();
				glLoadIdentity();
				glOrtho(0,worldW, worldH, 0, -1.0f, 1.0f);
			glMatrixMode(GL_MODELVIEW);
			glPushMatrix();
			glLoadIdentity();
		}

		void ResetView()
		{
			glPopAttrib();
			glMatrixMode(GL_PROJECTION);
			glPopMatrix();
			glMatrixMode(GL_MODELVIEW);
			glPopMatrix();
		}

	}
}